// @ts-ignore
/* eslint-disable */
import request from '@/utils/request.ts'

/** 此处后端没有提供注释 POST /mistake/add */
export async function add2(body: API.BizUserQuestionMistakes, options?: { [key: string]: any }) {
  return request<API.BaseResponseObject>('/mistake/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /mistake/batchDelete */
export async function batchDelete(body: number[], options?: { [key: string]: any }) {
  return request<API.BaseResponseObject>('/mistake/batchDelete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 DELETE /mistake/delete/${param0} */
export async function delete3(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.delete3Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.BaseResponseObject>(`/mistake/delete/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /mistake/list */
export async function list2(options?: { [key: string]: any }) {
  return request<API.BaseResponseObject>('/mistake/list', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /mistake/listById */
export async function listByUserId(options?: { [key: string]: any }) {
  return request<API.BaseResponseObject>('/mistake/listById', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /mistake/listDetail */
export async function listMistakeQuestionsByUserId(options?: { [key: string]: any }) {
  return request<API.BaseResponseObject>('/mistake/listDetail', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /mistake/search */
export async function searchMistakeQuestionsByContent(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.searchMistakeQuestionsByContentParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject>('/mistake/search', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}
